<mat-card class="nb-dashboard-table">
    <mat-table #table [dataSource]="dataSource">
      <ng-container matColumnDef="SN">
        <mat-header-cell class="symbol-no" *matHeaderCellDef> SN </mat-header-cell>
        <mat-cell class="symbol-no" *matCellDef="let element let i=index"> {{preIndex+(i+1)}} </mat-cell>
      </ng-container>
      <ng-container matColumnDef="Full Name">
        <mat-header-cell *matHeaderCellDef> Full Name </mat-header-cell>
        <mat-cell *matCellDef="let element"> {{element.fullName}} </mat-cell>
      </ng-container>
      <ng-container matColumnDef="Email">
        <mat-header-cell *matHeaderCellDef>Email</mat-header-cell>
        <mat-cell *matCellDef="let element"> {{element.email}} </mat-cell>
      </ng-container>
      <ng-container matColumnDef="Contact Number">
        <mat-header-cell *matHeaderCellDef>Contact Number</mat-header-cell>
        <mat-cell *matCellDef="let element">
          {{element.contactNumber}}
        </mat-cell>
      </ng-container>
      <ng-container matColumnDef="Date">
        <mat-header-cell *matHeaderCellDef>Date</mat-header-cell>
        <mat-cell *matCellDef="let element"> {{changeDateFormat(element.addedOn)}} </mat-cell>
      </ng-container>
      <ng-container matColumnDef="Actions">
        <mat-header-cell *matHeaderCellDef>Actions</mat-header-cell>
        <mat-cell class="nb-icon-cell" *matCellDef="let element">
          <button mat-mini-fab class="material-icon-sm" color="primary" (click)="showDetail(element._id)">
            <i class="fa fa-eye"></i>
          </button>
          <button mat-mini-fab class="material-icon-sm" color="warn" (click)="delete(element._id)">
            <i class="fa fa-trash"></i>
          </button>
        </mat-cell>
      </ng-container>
      <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
      <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
    </mat-table>
    <div class="p-3 text-center" *ngIf="objResponse?.dataList?.length==0">
        No Records Found
    </div>
      <mat-paginator *ngIf="objResponse?.dataList?.length>0" [length]="totalItems" [pageSize]="perPage" [pageSizeOptions]="pageSizeOptions" (page)="pageChanged($event)">
      </mat-paginator>
</mat-card>
